/**
 * Created by mikezhangding on 20/2/2017.
 */
'use strict';


/*app.controller('homeCtrl', function ($state, $scope, $http, $localStorage,$ionicSlideBoxDelegate) {*/

angular.module('home.module', [])
  .controller('homeCtrl', function ($state, $scope, $rootScope,$http, $localStorage, $ionicSlideBoxDelegate) {


  })

    .controller('tabCtrl', function ($state, $scope, $rootScope,$http, $localStorage, $ionicSlideBoxDelegate) {
        $scope.getOpenInfo = function () {
            $http.get(API('huanbi/findUser?openId=')+$rootScope.openId).success(function (result) {
                if(result.data.cardId != null ){
                    $rootScope.userMessage =true;
                    $rootScope.userdata = result.data;
                }else {
                    $rootScope.userMessage =false;
                }
            })
        }
        $scope.getOpenInfo();
    })
